import React from "react";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import ResearchHome from "../screens/research/ResearchHome";
import { Feather } from "@expo/vector-icons";
import ResearchUpload from "../screens/research/ResearchUpload";
import { ResearchProvider } from "../context/preparation/ResearchContext";
const Stack = createNativeStackNavigator();

const ResearchNavigation = ({ navigation }) => {
  return (
    <ResearchProvider>
      <Stack.Navigator
        initialRouteName="Research"
        screenOptions={{
          headerTitleAlign: "center",
          headerTintColor: "#fff",
          headerStyle: {
            backgroundColor: "#A80108",
          },
        }}
      >
        <Stack.Screen
          name="ResearchHome"
          component={ResearchHome}
          options={{
            headerShown: true,
            title: "调研报告",
            headerLeft: () => (
              <Feather
                name="user"
                style={{ padding: 5 }}
                size={25}
                color="#fff"
                onPress={() => navigation.openDrawer()}
              />
            ),
          }}
        />
        <Stack.Screen
          name="ResearchUpload"
          component={ResearchUpload}
          options={{
            headerShown: true,
            title: "调研报告上传",
          }}
        />
      </Stack.Navigator>
    </ResearchProvider>
  );
};

export default ResearchNavigation;
